#include <iostream>
#include <string>
using namespace std;
int main()
{
    string rat;
    string cat;
    string bat;
    string tartar;
    string number=" ";
    int duck=0;
    int tee=0;
    cout<<"Ввод:";
    cin>>rat;
    cin>>cat;
    cin>>bat;
    tartar=rat+" "+cat+" "+bat;
    for (char i: tartar) {
        if (i == ' ') {
            tee+=1;
        }
    }
    if (rat=="one" or cat=="one" or bat=="one"){
        number+="1";
        duck+=1;
    }
    if (rat=="two" or cat=="two" or bat=="two"){
        number+="2";
        duck+=1;
    }
    if (rat=="three" or cat=="three" or bat=="three"){
        number+="3";
        duck+=1;
    }
    if (rat=="four" or cat=="four" or bat=="four"){
        number+="4";
        duck+=1;
    }
    if (rat=="five" or cat=="five" or bat=="five"){
        number+="5";
        duck+=1;
    }
    if (rat=="six" or cat=="six" or bat=="six"){
        number+="6";
        duck+=1;
    }
    if (rat=="seven" or cat=="seven" or bat=="seven"){
        number+="7";
        duck+=1;
    }
    if (rat=="eight" or cat=="eight" or bat=="eight"){
        number+="8";
        duck+=1;
    }
    if (rat=="nine" or cat=="nine" or bat=="nine"){
        number+="9";
        duck+=1;
    }
    if (duck<tee+1){
        cout<<"Wrong input";
    }
    if (duck==tee+1){
        cout<<number;
    }
    
}